Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 11, 2025

  • Extract config_file method from action_class to enable external access
  • Add test case for config_file accessibility
  • Extract config_file implementation to helpers.rb (per review feedback)
  • Ensure external accessibility still works after refactoring
  • Validate syntax and logic of changes

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Contributor Author

Copilot AI commented Sep 11, 2025

@damacus 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI changed the title [WIP] Extract useful methods to outside of action_class Extract config_file method from action_class to enable external access Sep 11, 2025
Copilot finished work on behalf of damacus September 11, 2025 23:16
Copilot AI requested a review from damacus September 11, 2025 23:16
Comment on lines 66 to 67
def config_file
::File.join(conf_dir, "#{name}.conf")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract this to the helpers.rb

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extracted the config_file logic to a new nginx_site_config_file helper method in helpers.rb. The resource method now delegates to the helper while maintaining external accessibility. (13f62b2)

@damacus damacus marked this pull request as ready for review October 31, 2025 08:29
@damacus damacus requested a review from a team as a code owner October 31, 2025 08:29
@damacus
Copy link
Member

damacus commented Oct 31, 2025

@copilot rebase

Copilot finished work on behalf of damacus October 31, 2025 08:37
Copilot AI requested a review from damacus October 31, 2025 08:37
@github-actions
Copy link

Slowest examples

Top 10 slowest examples (0.95 seconds, 27.92% of total time)
Example Description Time in seconds
spec/unit/resources/site_spec.rb:32 nginx_site with template is expected to create template "/etc/nginx/conf.http.d/default.conf" 0.23782
spec/unit/resources/install_spec.rb:14 nginx_install with default properties with repo source with centos platform is expected to do nothing 0.13325
spec/unit/resources/install_spec.rb:22 nginx_install with default properties with repo source with amazon platform is expected to notify "ohai[nginx]" with action :reload immediately 0.08978
spec/unit/resources/config_spec.rb:17 nginx_config with default properties is expected to create template "/etc/nginx/nginx.conf" 0.08405
spec/unit/resources/config_spec.rb:52 nginx_config with default properties is expected to create directory "/etc/nginx/conf.http.d" 0.07532
spec/unit/resources/install_spec.rb:72 nginx_install with default properties with repo source with ubuntu platform is expected to add apt_repository "nginx" 0.07412
spec/unit/resources/install_spec.rb:22 nginx_install with default properties with epel source with amazon platform is expected to notify "ohai[nginx]" with action :reload immediately 0.07172
spec/unit/resources/install_spec.rb:22 nginx_install with default properties with epel source with centos 8 platform is expected to notify "ohai[nginx]" with action :reload immediately 0.06465
spec/unit/resources/install_spec.rb:15 nginx_install with default properties with distro source with ubuntu platform is expected to create template "(?-mix:/ohai/plugins/nginx.rb)" 0.06388
spec/unit/resources/install_spec.rb:22 nginx_install with default properties with epel source with centos-stream 9 platform is expected to notify "ohai[nginx]" with action :reload immediately 0.06094

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants